﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QLNSClient
{
    public partial class uc_dsKhenthuong : UserControl
    {
        QLNSServiceReference.QLNSServiceClient sv = new QLNSServiceReference.QLNSServiceClient();
        
        public uc_dsKhenthuong()
        {
            InitializeComponent();
        }

        public void LoadData()
        {

            lke_loaiKT.Properties.DataSource = sv.getKT();
            gv_dsKT.DataSource = sv.getCBKT();
        }

        private void uc_dsKhenthuong_Load(object sender, EventArgs e)
        {
            LoadData();
        }

        private void comboBoxEdit1_EditValueChanged(object sender, EventArgs e)
        {
            int a = Int32.Parse(lke_loaiKT.EditValue.ToString());
            gv_dsKT.DataSource = sv.getCBKTtheoKT(a);
        }

        private void btn_All_Click(object sender, EventArgs e)
        {
            LoadData();
        }
    }
}
